package com.shop.test;

import com.shop.pojo.Product;
import com.shop.service.ProductService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

public class test {
    @Autowired private ProductService productService;

    @Test
    public void fun() {
        Product product = new Product();
        product.setName("华为");
        //        product.setImage("/images/product/huawei.jpg");
        product.setMarketPrice(2000d);
        product.setShopPrice(1899d);
        productService.addProduct(product);
    }
}
